<?php

/**
 * This is class Form_Login
 *
 */
class Form_Login extends Zend_Form {
	/**
	 * This is method __construct
	 *
	 * @param mixed $options This is a description
	 * @return mixed This is the return value description
	 *
	 */	
	public function __construct($options = null) {
		parent::__construct($options);
		$this->setName('auth');
		
		$email = new Zend_Form_Element_Text('auth_email');
		$email->setLabel('Email')
			->setRequired(true)
			->addFilter('StringToLower')
			->addFilter('StripTags')
			->addFilter('StringTrim')
			->addValidator('NotEmpty', false, array('messages'=>'Cannot be empty'))
			->addValidator('EmailAddress', false, array('messages'=>'Email address is not valid'));		
		
		$password = new Zend_Form_Element_Text('auth_password');		
		$password->setLabel('Password')
			->setRequired(true)
			->addFilter('StripTags')
			->addFilter('StringTrim')			
			->addValidator('NotEmpty', false, array('messages'=>'Cannot be empty'));
		
		$submit = new Zend_Form_Element_Submit('auth_login');
		$submit->setAttrib('id', 'auth_login');
		$submit->setAttrib('class', 'submit');
		$submit->setLabel('Login');
		
		$this->addElements(array($email, $password, $submit));
	}
	
	public function setOauthToken($oauthToken) {
		
	}
}